package com.liangzai.factory;

import com.liangzai.handler.BlacklistHandler;
import com.liangzai.handler.ConversationHandler;
import com.liangzai.handler.CurrentLimitHandler;
import com.liangzai.handler.GatewayHandler;

/**
 * 工厂初始化 handler
 */
public class FactoryHandler {

    public static GatewayHandler getGatewayHandler() {
        //第一关
        GatewayHandler gatewayHandler1 = new CurrentLimitHandler();
        //第二关
        GatewayHandler gatewayHandler2 = new BlacklistHandler();
        gatewayHandler1.setHandler(gatewayHandler2);
        //第三关
        GatewayHandler gatewayHandler3 = new ConversationHandler();
        gatewayHandler2.setHandler(gatewayHandler3);
        return gatewayHandler1;
    }
}